// write your code here
import java.util.Scanner;

//错排问题
//目前不太懂
public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt(); 
            float n1 = factorial(n);
            float n2 = count(n);
            //分子分母相除
            float result = (n2/n1)*100;
            System.out.println(String.format("%.2f%%",result));
        }
        sc.close();
    }
    
    //错排算法
    public static float count(int n){
        if(n == 1) return 0;
        if(n == 2) return 1;
        return (n-1)*(count(n-1)+count(n-2));
    }
    
    
    //求阶乘
    public static float factorial(int n){
        if(n == 1) return n;
        return n * factorial(n-1);
    }
}